import java.io.File;
import java.io.FilenameFilter;

/**
 * Author: Daniel Michalski
 * Date: 24.03.13
 */

public class OnlyJpgFilter implements FilenameFilter {
    String ext;

    public OnlyJpgFilter(String ext) {
        this.ext = "." + ext;
    }

    @Override
    public boolean accept(File dir, String name) {
        return name.endsWith(ext);
    }
}
